<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>register</title>
    </head>
    <body>

        <%--使用标准动作创建Human实例并将其设置到pageContext属性中--%>
        <jsp:useBean id="human" class="com.kaifamiao.jspactions.Human" scope="page"></jsp:useBean>

        <%--接收来自表单的数据并填充到human对象相应属性中--%>
        <jsp:setProperty name="human" property="*"></jsp:setProperty>

        <%--从请求参数中获得指定名称的参数值并将其设置到human的password属性中--%>
        <%--human.setPassword( request.getParamter("passwd") )--%>
        <jsp:setProperty name="human" property="password" param="passwd" ></jsp:setProperty>

        <div>
            <p>id: <%= human.getId() %> </p>
            <p>name: <%= human.getName() %> </p>
            <p>gender: <%= human.getGender() %> </p>
        </div>

        <div>
            <p>nickname: <jsp:getProperty name="human" property="nickname" /> </p>
            <p>password: <jsp:getProperty name="human" property="password" /> </p>
            <p>username: <jsp:getProperty name="human" property="username" /> </p>
        </div>

        <hr>
        <div>
            <p>id: ${ human.id} </p>
            <p>name: ${ human.name } </p>
            <p>gender: ${ human.gender } </p>
        </div>


    </body>
</html>
